package com.sczmgk.hotline_pzh.hxim;

import com.sczmgk.hotline_pzh.MyApp;
import com.sczmgk.hotline_pzh.annotation.Column;
import com.sczmgk.hotline_pzh.annotation.CompareName;
import com.sczmgk.hotline_pzh.annotation.ID;
import com.sczmgk.hotline_pzh.annotation.TableName;
import com.sczmgk.hotline_pzh.annotation.Where;
import com.sczmgk.hotline_pzh.db.DBHelper;

@CompareName("msgtime")
@TableName(DBHelper.TABLE_NEW_MSG_COUNT)
public class NewMsgCountBean implements Comparable<NewMsgCountBean>{
	/**
	 * 消息源   0 发送  1 接收
	 */
	@Column(DBHelper.MSGDIR)
	private int msgdir;
	/**
	 * 环信消息id
	 */
	@Column(DBHelper.MSGID)
	private String msgid="";
	/**
	 * 用户id
	 */
	@Column(DBHelper.USERID)
	private int userid;
	/**
	 * 消息id(我们管理)
	 */
	@Where(isQuery = true)
	@Column(DBHelper.CHATID)
	private String chatid;
	/**
	 * 表id
	 */
	@Column(DBHelper.TABLE_ID)
	@ID(autoIncrement = true)
	private int id;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getChatid() {
		return chatid;
	}

	public void setChatid(String chatid) {
		this.chatid = chatid;
	}

	@Override
	public int compareTo(NewMsgCountBean o) {
		// TODO Auto-generated method stub
		return 0;
	}

	public int getMsgdir() {
		return msgdir;
	}

	public void setMsgdir(int msgdir) {
		this.msgdir = msgdir;
	}

	public int getUserid() {
		return userid;
	}

	public void setUserid(int userid) {
		this.userid = userid;
	}

	public String getMsgid() {
		return msgid;
	}

	public void setMsgid(String msgid) {
		this.msgid = msgid;
	}

	public NewMsgCountBean(int msgdir, String msgid, String chatid) {
		this.msgdir = msgdir;
		this.msgid = msgid;
		this.chatid = chatid;
		this.userid = MyApp.loginUserUid;
	}

	public NewMsgCountBean() {
	}
}
